package com.youaishujuhui.devops.web.service.manage;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.youaishujuhui.devops.web.dao.manage.SysRoleDao;
import com.youaishujuhui.devops.web.domain.manage.SysRole;

@Service
public class SysRoleService {
	
	@Autowired
	private SysRoleDao sysRoleDao;
	
	public int total() {
		return sysRoleDao.total();
	}
	
	public SysRole findById(Integer id) {
		return sysRoleDao.findById(id);
	}
	
	public int update(SysRole po) {
		return sysRoleDao.update(po);
	}

	public List<SysRole> query(Map<String, Object> param) {
		return sysRoleDao.query(param);
	}

	public int countByCode(String code) {
		return sysRoleDao.countByCole(code);
	}

	public SysRole insert(SysRole po) {
		return sysRoleDao.insert(po);
	}

	public void clearResources(SysRole role) {
		sysRoleDao.clearResources(role);
	}

	public void insertRelation(SysRole role) {
		sysRoleDao.insertRelation(role);
	}
	
}
